package com.atguigu.f_array;

public class Demo1 {
    public static void main(String[] args) {
        //定义一个int数组
        int[] arr = {1,2,3,4,5};
        //查元素
        System.out.println("arr[3] = " + arr[3]);

        int num = arr[3];
        System.out.println("num = " + num);


        //查长度
        System.out.println("arr.length = " + arr.length);//5


        //改元素
        System.out.println("arr[2] = " + arr[2]);
        arr[2] = 6;
        System.out.println("arr[2] = " + arr[2]);
    }
}
